﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true"
    CodeFile="EditPromotion.aspx.cs" Inherits="PromotionInfo_EditPromotion" CodeFileBaseClass="Frame.Pages.ActionInfomationEditBasePage" %>

<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridLookup" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2.Linq, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script language="javascript" type="text/javascript">
        function GetPart(id, sxfw) {
            lists.SelectAllRowsOnPage(false);
            labcxbm.SetText(id);
            $.ajax({
                type: "Post",
                url: "EditPromotion.aspx/GetParts",
                data: "{'sxfw': '" + sxfw + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    lists.SelectRowsByKey(data.d);
                }
                //                error: function (err) {
                //                    alert("关联人员获取失败,请重试！");
                //                }
            });
        }
        //显示促销登记详情
        function ShowDetails(id) {
            $.ajax({
                type: "Post",
                url: "EditPromotion.aspx/GetDet",
                data: "{'cxbh': '" + id + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    //ccxbm.SetText(data.d[1]);
                    cbz.SetText(data.d[0]);
                    cspbm.SetText(data.d[1]);
                    cflag_sq.SetValue(data.d[2]);
                    ccmbflags_zq.SetValue(data.d[3]);
                    cspmc.SetText(data.d[4]);
                }
            });
            pupShows.Show();
        }
        //显示部门信息
        function ShowUser() {
            if (pupPartShow.IsWindowVisible()) {
                //alert("保存成功！");
                noty({ "text": "门店保存成功！",
                    "layout": "top",
                    "type": "success",
                    "animateOpen": { "height": "toggle" },
                    "animateClose": { "height": "toggle" },
                    "speed": 500,
                    "timeout": 1000,
                    "closeButton": false,
                    "closeOnSelfClick": true,
                    "closeOnSelfOver": false
                });
                pupPartShow.Hide();
            }
            else {
                pupPartShow.Show();
            }

            //. pupPartShow.Show();
        }
        //显示商品信息
        function ShowProduct() {
            pupProShow.Show();
        }
        //获取焦点
        function OnGridFocusedRowChanged() {

            gvQuery.GetRowValues(gvQuery.GetFocusedRowIndex(), 'cxbh;sm', OnGetRowValues);
            // gvQuery.SetFocusedRowIndex(0);
        }
        function OnGetRowValues(values) {
            labcxbm.SetText(values[0]);
            ccxbm.SetText(values[0]);
        }

        //单选
        function grid_SelectionChanged(s, e) {
            s.GetSelectedFieldValues("cxbh;flag", GetSelectedFieldValuesCallback);
        }
        function GetSelectedFieldValuesCallback(values) {
            if (values != "") {
                labcxbm.SetText(values[0][0]);
            }

        }

        //选择商品
        function gridPro_SelectionChanged(s, e) {
            s.GetSelectedFieldValues("spbm;spmc", GetSelectedFieldValuesCallbackS);
        }
        function GetSelectedFieldValuesCallbackS(values) {
            if (values != "") {
                labProid.SetText(values[0][0]);
                labProname.SetText(values[0][1]);
                cspbm.SetText(values[0][0]);
                cspmc.SetText(values[0][1]);
            }
        }
    </script>
    <link href="../Css/table.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainContent">
    <dx:ASPxRoundPanel ID="MainRoundPanel" runat="server" View="GroupBox" Width="100%"
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
        EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px"
        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
        <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
        <HeaderStyle>
            <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
        </HeaderStyle>
        <PanelCollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
            </dx:PanelContent>
        </PanelCollection>
    </dx:ASPxRoundPanel>
    <h1 class="DemoTitle">
        促销管理
    </h1>
    <div id="DemoArea">
        <div style="width: 100%;">
            <div style="width: 20%; float: left;">
                <dx:ASPxButton ID="btnSxPart" runat="server" Text="指定生效门店" Width="150px" ClientInstanceName="sxpart"
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                    AutoPostBack="false" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                    <ClientSideEvents Click="function(s,e){ShowUser();QueryTree.PerformCallback(); }" />
                </dx:ASPxButton>
            </div>
            <%--   <div style="width:80%; float:left;">
                <dx:ASPxButton ID="btnLookZq" runat="server" Text="查看赠卷信息" Width="150px" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                </dx:ASPxButton>
            </div>--%>
        </div>
        <dx:ASPxGridView ID="gridView" runat="server" Width="100%" AutoGenerateColumns="False"
            KeyFieldName="cxbh" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
            CssPostfix="Office2010Blue" OnCellEditorInitialize="gridView_CellEditorInitialize"
            OnRowInserting="gridView_RowInserting" OnRowUpdating="gridView_RowUpdating" ClientInstanceName="gvQuery"
            RightToLeft="False" OnRowDeleting="gridView_RowDeleting" DataSourceID="LSMDSourceMainProPromotion">
            <%--<ClientSideEvents SelectionChanged="grid_SelectionChanged" />--%>
            <%--<ClientSideEvents EndCallback="ShowDetails" />--%>
            <SettingsEditing Mode="PopupEditForm" PopupEditFormHorizontalAlign="WindowCenter"
                PopupEditFormVerticalAlign="WindowCenter" PopupEditFormModal="True" PopupEditFormWidth="600px">
            </SettingsEditing>
            <Settings ShowFilterRow="True"></Settings>
            <SettingsDetail ShowDetailRow="True"></SettingsDetail>
            <ClientSideEvents FocusedRowChanged="OnGridFocusedRowChanged" />
            <Columns>
                <%-- <dx:GridViewCommandColumn ShowInCustomizationForm="True" ShowSelectCheckbox="True"
                    VisibleIndex="0" Width="10px">
                    <ClearFilterButton Visible="True">
                    </ClearFilterButton>
                </dx:GridViewCommandColumn>--%>
                <dx:GridViewDataTextColumn FieldName="cxbh" VisibleIndex="0" Caption="促销编号" CellStyle-HorizontalAlign="Left"
                    Name="t_cxbh" Visible="False">
                    <PropertiesTextEdit MaxLength="10" Width="200px" Style-Font-Size="10pt">
                        <Style Font-Size="10pt"></Style>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" ColumnSpan="2" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataMemoColumn Caption="促销说明" FieldName="sm" Name="t_sm" CellStyle-HorizontalAlign="Left"
                    VisibleIndex="1" Visible="False">
                    <PropertiesMemoEdit Height="50px" Width="550px" Style-Font-Size="10pt">
                        <ValidationSettings CausesValidation="true">
                            <RequiredField ErrorText="促销说明不能为空！"></RequiredField>
                        </ValidationSettings>
                        <Style Font-Size="10pt"></Style>
                    </PropertiesMemoEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" ColumnSpan="2"></EditFormSettings>
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                    <EditFormSettings CaptionLocation="Near" Visible="True" />
                </dx:GridViewDataMemoColumn>
                <dx:GridViewDataComboBoxColumn Caption="促销方式" FieldName="cxfs" Name="t_cxfss" VisibleIndex="2">
                    <PropertiesComboBox ValueType="System.String" Spacing="0" Width="200px">
                        <Items>
                            <dx:ListEditItem Text="满减" Value="J" />
                            <dx:ListEditItem Text="满送" Value="S" />
                            <dx:ListEditItem Text="满减后送" Value="JS" />
                        </Items>
                    </PropertiesComboBox>
                    <EditFormSettings CaptionLocation="Near" Visible="True" ColumnSpan="2" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataComboBoxColumn Caption="生效门店" FieldName="sxfw" Name="t_sxfw" VisibleIndex="3"
                    Visible="False">
                    <PropertiesComboBox EnableFocusedStyle="False" Spacing="0" Width="200px" ValueType="System.String"
                        TextField="bmmc" ValueField="bmbm">
                        <%-- <Columns>
                            <dx:ListBoxColumn Caption="门店编号" FieldName="bmbm" />
                            <dx:ListBoxColumn Caption="门店名称" FieldName="bmmc" />
                        </Columns>--%>
                    </PropertiesComboBox>
                    <EditFormSettings CaptionLocation="Near" Visible="False" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataTextColumn Caption="活动金额1" FieldName="hdje1" Name="t_hdje1" Visible="False"
                    VisibleIndex="4">
                    <PropertiesTextEdit DisplayFormatString="c" MaxLength="10" Width="200px">
                        <MaskSettings Mask="&lt;0..9999999999g&gt;.&lt;00..99&gt;" IncludeLiterals="DecimalSymbol">
                        </MaskSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="活动金额2" FieldName="hdje2" Name="t_hdje2" Visible="False"
                    VisibleIndex="5">
                    <PropertiesTextEdit DisplayFormatString="c" MaxLength="10" Width="200px">
                        <MaskSettings Mask="&lt;0..9999999999g&gt;.&lt;00..99&gt;" IncludeLiterals="DecimalSymbol">
                        </MaskSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="销售金额1" FieldName="xsje1" Name="t_sje1" Visible="False"
                    VisibleIndex="6">
                    <PropertiesTextEdit DisplayFormatString="c" MaxLength="10" Width="200px">
                        <MaskSettings Mask="&lt;0..9999999999g&gt;.&lt;00..99&gt;" IncludeLiterals="DecimalSymbol">
                        </MaskSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="销售金额2" FieldName="xsje2" Name="t_xsje2" Visible="False"
                    VisibleIndex="7">
                    <PropertiesTextEdit DisplayFormatString="c" MaxLength="10" Width="200px">
                        <MaskSettings Mask="&lt;0..9999999999g&gt;.&lt;00..99&gt;" IncludeLiterals="DecimalSymbol">
                        </MaskSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="上限金额1" FieldName="sxje1" Name="t_sxje1" Visible="False"
                    VisibleIndex="8">
                    <PropertiesTextEdit DisplayFormatString="c" MaxLength="10" Width="200px">
                        <MaskSettings Mask="&lt;0..9999999999g&gt;.&lt;00..99&gt;" IncludeLiterals="DecimalSymbol">
                        </MaskSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="上限金额2" FieldName="sxje2" Name="t_sxje2" Visible="False"
                    VisibleIndex="9">
                    <PropertiesTextEdit DisplayFormatString="c" MaxLength="10" Width="200px">
                        <MaskSettings Mask="&lt;0..9999999999g&gt;.&lt;00..99&gt;" IncludeLiterals="DecimalSymbol">
                        </MaskSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataComboBoxColumn Caption="生效标志" FieldName="flag" Name="t_flags" VisibleIndex="10">
                    <PropertiesComboBox ValueType="System.String" Spacing="0" Width="200px">
                        <Items>
                            <dx:ListEditItem Text="是" Value="Y" ImageUrl="~/Images/icon/A.png" />
                            <dx:ListEditItem Text="否" Value="N" ImageUrl="~/Images/icon/Cancel.png" />
                        </Items>
                    </PropertiesComboBox>
                    <EditFormSettings CaptionLocation="Near" Visible="False" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataTimeEditColumn Caption="开始日期" FieldName="qsrq" Name="t_qsrq" Visible="False"
                    VisibleIndex="11">
                    <PropertiesTimeEdit EditFormat="DateTime" Spacing="0" Width="200px">
                    </PropertiesTimeEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTimeEditColumn>
                <dx:GridViewDataTimeEditColumn Caption="终止日期" FieldName="zzrq" Name="t_zzrq" Visible="False"
                    VisibleIndex="12">
                    <PropertiesTimeEdit EditFormat="DateTime" Spacing="0" Width="200px">
                    </PropertiesTimeEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTimeEditColumn>
                <dx:GridViewDataTimeEditColumn Caption="生效日期" FieldName="sxrq" Name="t_sxrq" Visible="False"
                    VisibleIndex="13">
                    <PropertiesTimeEdit EditFormat="DateTime" Spacing="0" Width="200px">
                    </PropertiesTimeEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="False" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTimeEditColumn>
                <dx:GridViewDataTimeEditColumn Caption="取消日期" FieldName="qxrq" Name="t_qxrq" Visible="False"
                    VisibleIndex="14">
                    <PropertiesTimeEdit EditFormat="DateTime" Spacing="0" Width="200px">
                    </PropertiesTimeEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="False" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTimeEditColumn>
                <dx:GridViewDataMemoColumn FieldName="xpsm" VisibleIndex="15" Caption="小票说明" Name="t_xpsm"
                    Visible="False">
                    <PropertiesMemoEdit Width="550px" Height="50px" Style-Font-Size="10pt">
                        <ValidationSettings>
                            <RequiredField IsRequired="True" />
                        </ValidationSettings>
                        <Style Font-Size="10pt"></Style>
                    </PropertiesMemoEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" ColumnSpan="2"></EditFormSettings>
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataMemoColumn>
                <dx:GridViewDataComboBoxColumn Caption="是否使用系统赠卷" FieldName="flag_zq" Name="t_flag_zqs"
                    VisibleIndex="16">
                    <PropertiesComboBox ValueType="System.String" Spacing="0" Width="200px">
                        <Items>
                            <dx:ListEditItem ImageUrl="~/Images/icon/A.png" Text="是" Value="Y" />
                            <dx:ListEditItem ImageUrl="~/Images/icon/Z.png" Text="否" Value="N" />
                        </Items>
                    </PropertiesComboBox>
                    <EditFormSettings CaptionLocation="Near" Visible="True" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataTextColumn Caption="单张赠券金额" FieldName="zqje" Name="t_zqje" VisibleIndex="17">
                    <PropertiesTextEdit DisplayFormatString="c" MaxLength="10" Width="200px">
                        <MaskSettings Mask="&lt;0..9999999999g&gt;.&lt;00..99&gt;" IncludeLiterals="DecimalSymbol">
                        </MaskSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <DataItemTemplate>
                        <a href="EditGiveCoup.aspx?id=<%#Eval("cxbh") %>">
                            <%#Eval("zqje") %></a>
                    </DataItemTemplate>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataMemoColumn Caption="备注" FieldName="bz" Name="t_bz" ShowInCustomizationForm="True"
                    Visible="False" VisibleIndex="18">
                    <PropertiesMemoEdit Height="50px" Width="550px">
                        <ValidationSettings>
                            <RequiredField IsRequired="True" />
                        </ValidationSettings>
                    </PropertiesMemoEdit>
                    <EditFormSettings CaptionLocation="Near" Visible="True" ColumnSpan="2"></EditFormSettings>
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataMemoColumn>
                <dx:GridViewDataTextColumn FieldName="founder" VisibleIndex="19" Caption="创建者" Name="t_founder"
                    Visible="False">
                    <PropertiesTextEdit Width="200px">
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="fdate" VisibleIndex="20" Caption="创建日期" Name="t_fdate"
                    Visible="False">
                    <PropertiesTextEdit Width="200px">
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="editor" VisibleIndex="21" Caption="最后修订人" Name="t_editor"
                    Visible="False">
                    <PropertiesTextEdit Width="200px">
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="edate" VisibleIndex="22" Caption="最后修订日期" Name="t_edate"
                    Visible="False">
                    <PropertiesTextEdit Width="200px">
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <%--<dx:GridViewDataTextColumn Caption="生效门店" VisibleIndex="23" Name="t_detail">
                    <EditFormSettings Visible="False" />
                    <DataItemTemplate>
                        <dx:ASPxHyperLink ID="ASPxHyperLink1" runat="server" Text="生效门店">
                            <ClientSideEvents Click="function(s,e){QueryTree.PerformCallback(); }" />
                        </dx:ASPxHyperLink>
                    </DataItemTemplate>
                </dx:GridViewDataTextColumn>--%>
                <dx:GridViewDataTextColumn Caption="促销明细登记" VisibleIndex="23" Width="100px" Name="t_details">
                    <EditFormSettings Visible="False" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <DataItemTemplate>
                        <%--   <dx:ASPxHyperLink ID="ASPxHyperLink2" runat="server" Text="促销明细登记" >
                             <ClientSideEvents Click="function(s, e) {
                                ShowDetails();gvQuery.PerformCallback(ccxbm.GetText());
                        }" />
                       
                        </dx:ASPxHyperLink >--%>
                        <%-- <a href="javascript:ShowDetails(' <%# Eval("cxbh")%> ');">促销明细登记</a>--%>
                        <a href="EditPromotionDetail.aspx?cxbh=<%#Eval("cxbh") %>">促销明细登记</a>
                    </DataItemTemplate>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="是否生效" VisibleIndex="24" Name="t_detail" Width="100px">
                    <EditFormSettings Visible="False" />
                    <EditCellStyle HorizontalAlign="Left">
                    </EditCellStyle>
                    <DataItemTemplate>
                        <div style="width: 100%">
                            <div style="float: left">
                                <dx:ASPxButton ID="btnSx" runat="server" ClientInstanceName="cxsx" Text="生效" CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
                                    AutoPostBack="false" CssPostfix="Office2003Olive" OnClick="btnSx_Click" SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css">
                                </dx:ASPxButton>
                            </div>
                            <div style="float: left">
                                <dx:ASPxButton ID="btnQx" runat="server" ClientInstanceName="cxqx" Text="取消" CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
                                    AutoPostBack="false" CssPostfix="Office2003Olive" OnClick="btnQx_Click" SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css">
                                </dx:ASPxButton>
                            </div>
                        </div>
                    </DataItemTemplate>
                </dx:GridViewDataTextColumn>
            </Columns>
            <SettingsBehavior AllowFocusedRow="True" />
            <SettingsEditing EditFormColumnCount="2" Mode="PopupEditForm" PopupEditFormWidth="600px"
                PopupEditFormHorizontalAlign="WindowCenter" PopupEditFormVerticalAlign="WindowCenter" />
            <Settings ShowFilterRow="true" />
            <SettingsText PopupEditFormCaption="编辑" EmptyDataRow="没有记录"></SettingsText>
            <SettingsDetail ShowDetailRow="true" ShowDetailButtons="true" />
            <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanelOnStatusBar>
                <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanel>
            </Images>
            <ImagesFilterControl>
                <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanel>
            </ImagesFilterControl>
            <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                </Header>
                <LoadingPanel ImageSpacing="5px">
                </LoadingPanel>
            </Styles>
            <StylesPager>
                <PageNumber ForeColor="#3E4846">
                </PageNumber>
                <Summary ForeColor="#1E395B">
                </Summary>
            </StylesPager>
            <StylesEditors ButtonEditCellSpacing="0">
                <ProgressBar Height="21px">
                </ProgressBar>
            </StylesEditors>
            <Templates>
                <DetailRow>
                    <table id="mytable">
                        <tr style="height: 30px">
                            <td class="t1">
                                促销说明:
                            </td>
                            <td class="t2" colspan="3" style="text-indent: 2em">
                                <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="View_qyxz" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("sm") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td class="t1">
                                销售金额1:
                            </td>
                            <td class="t2">
                                ￥<dx:ASPxLabel Width="200px" Font-Size="10pt" ID="View_frdb" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("xsje1") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td class="t1">
                                销售金额2:
                            </td>
                            <td class="t2">
                                ￥<dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel2" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("xsje2") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td class="t1">
                                活动金额1
                            </td>
                            <td class="t2">
                                ￥<dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel3" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("hdje1") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td class="t1">
                                活动金额2:
                            </td>
                            <td class="t2">
                                ￥<dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel4" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("hdje2") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td class="t1">
                                上限金额1:
                            </td>
                            <td class="t2">
                                ￥<dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel5" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("sxje1") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td class="t1">
                                上限金额2:
                            </td>
                            <td class="t2">
                                ￥<dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel6" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("sxje2") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td class="t1">
                                开始日期:
                            </td>
                            <td class="t2">
                                <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel1" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("qsrq") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td class="t1">
                                终止日期:
                            </td>
                            <td class="t2">
                                <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel7" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("zzrq") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td class="t1">
                                生效日期:
                            </td>
                            <td class="t2">
                                <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel8" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("sxrq") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td class="t1">
                                取消日期:
                            </td>
                            <td class="t2">
                                <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel9" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("qxrq") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr style="height: 30px">
                            <td class="t1">
                                小票说明:
                            </td>
                            <td class="t2" colspan="3" style="text-indent: 2em">
                                <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel10" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("xpsm") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr style="height: 30px">
                            <td class="t1">
                                备注:
                            </td>
                            <td class="t2" colspan="3" style="text-indent: 2em">
                                <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel11" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("bz") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td class="t1">
                                创建者:
                            </td>
                            <td class="t2">
                                <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel12" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("founder") %>'
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td class="t1">
                                创建日期:
                            </td>
                            <td class="t2">
                                <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel13" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("fdate") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td class="t1">
                                最后修订人:
                            </td>
                            <td class="t2">
                                <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel14" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("editor") %>'
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td class="t1">
                                最后修订日期:
                            </td>
                            <td class="t2">
                                <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="ASPxLabel15" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("edate") %>' CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                    </table>
                </DetailRow>
            </Templates>
        </dx:ASPxGridView>
        <dx:ASPxPopupControl ID="ASPxPopupControl4" runat="server" ClientInstanceName="pupShows"
            Width="700px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
            EnableHotTrack="False" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
            HeaderText="促销详情" Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter">
            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
            </LoadingPanelImage>
            <LoadingPanelStyle ImageSpacing="5px">
            </LoadingPanelStyle>
            <ContentCollection>
                <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                    <table width="100%">
                        <tr>
                            <td class="style1">
                                促销编码：
                            </td>
                            <td class="style1">
                                <div style="float: left">
                                    <dx:ASPxTextBox ID="txtcxbm" ClientInstanceName="ccxbm" runat="server" Width="200px"
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" ReadOnly="True">
                                    </dx:ASPxTextBox>
                                </div>
                            </td>
                            <td class="style1">
                                商品名称：
                            </td>
                            <td class="style1">
                                <div style="float: left; width: 150px;">
                                    <dx:ASPxLabel ID="lblspmc" runat="server" ClientInstanceName="cspmc" Text="">
                                    </dx:ASPxLabel>
                                    (商品编码:<dx:ASPxLabel ID="lblspbm" runat="server" ClientInstanceName="cspbm" Text="">
                                    </dx:ASPxLabel>
                                    )
                                </div>
                                <div style="float: left; width: 50px;">
                                    <a href="javascript:ShowProduct()">选择商品</a></div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                是否赠卷：
                            </td>
                            <td>
                                <span id="Span1">
                                    <dx:ASPxComboBox ID="cmbflag_zqs" runat="server" Width="200px" ClientInstanceName="ccmbflags_zq"
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                        Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                        <Items>
                                            <dx:ListEditItem ImageUrl="~/Images/icon/A.png" Text="是" Value="Y" />
                                            <dx:ListEditItem ImageUrl="~/Images/icon/Cancel.png" Text="否" Value="N" />
                                        </Items>
                                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                        </LoadingPanelImage>
                                        <LoadingPanelStyle ImageSpacing="5px">
                                        </LoadingPanelStyle>
                                    </dx:ASPxComboBox>
                                </span>
                            </td>
                            <td>
                                是否收卷：
                            </td>
                            <td>
                                <dx:ASPxComboBox ID="cmbflag_sqs" runat="server" Width="200px" ClientInstanceName="cflag_sq"
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                    Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                    <Items>
                                        <dx:ListEditItem Text="是" Value="Y" ImageUrl="~/Images/icon/A.png" />
                                        <dx:ListEditItem Text="否" Value="N" ImageUrl="~/Images/icon/Cancel.png" />
                                    </Items>
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                </dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                备注：
                            </td>
                            <td colspan="3">
                                <dx:ASPxMemo ID="txtbz" runat="server" Height="71px" Width="540px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    ClientInstanceName="cbz" CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                </dx:ASPxMemo>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" align="right">
                                <table width="150px">
                                    <tbody>
                                        <tr>
                                            <td width="100%" align="right">
                                                <div style="float: left;">
                                                    <dx:ASPxButton ID="btnAdd" runat="server" Text="更新" CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
                                                        CssPostfix="Office2003Olive" SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css">
                                                        <ClientSideEvents Click="function(s,e){prolist.PerformCallback(labProid.GetText()); }" />
                                                        <ClientSideEvents Click="function(s,e){prolist.PerformCallback(labProid.GetText()); }">
                                                        </ClientSideEvents>
                                                    </dx:ASPxButton>
                                                </div>
                                                <div style="float: left;">
                                                    <dx:ASPxButton ID="btnSxD" runat="server" Text="生效" CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
                                                        CssPostfix="Office2003Olive" OnClick="btnSxD_Click" SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css">
                                                        <ClientSideEvents Click="function(s,e){pupShows.Hide();}" />
                                                    </dx:ASPxButton>
                                                </div>
                                                <div style="float: left;">
                                                    <dx:ASPxButton ID="btnQxD" runat="server" Text="取消" CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
                                                        CssPostfix="Office2003Olive" OnClick="btnQxD_Click" SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css">
                                                    </dx:ASPxButton>
                                                </div>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </td>
                        </tr>
                    </table>
                </dx:PopupControlContentControl>
            </ContentCollection>
        </dx:ASPxPopupControl>
        <dx:LinqServerModeDataSource ID="LSMDSourceMainProPromotionDetails" runat="server"
            ContextTypeName="DAL.DataClassesDataContext" EnableDelete="True" EnableInsert="True"
            EnableUpdate="True" TableName="css_sp_mjms_mx" />
        <dx:ASPxPopupControl ID="ASPxPopupControl3" runat="server" ClientInstanceName="pupPartShow"
            Width="300px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
            EnableHotTrack="False" HeaderText="指定生效门店" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
            Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter">
            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
            </LoadingPanelImage>
            <LoadingPanelStyle ImageSpacing="5px">
            </LoadingPanelStyle>
            <ContentCollection>
                <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True">
                    <table>
                        <tr>
                            <td>
                                促销编码：
                            </td>
                            <td>
                                <%-- <dx:ASPxLabel ID="cbmbm" runat="server" ClientInstanceName="cbmbm" Text="">
                            </dx:ASPxLabel>--%>
                                <dx:ASPxLabel ID="labcxbm" runat="server" ClientInstanceName="labcxbm" Text="ASPxLabel">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                    </table>
                    <dx:ASPxCallbackPanel ID="QueryCBPanel" runat="server" OnCallback="QueryCBPanel_Callback"
                        ClientInstanceName="QueryPanel">
                        <PanelCollection>
                            <dx:PanelContent ID="PanelContent1" runat="server">
                                <dx:ASPxTreeList ID="DxTreelist" runat="server" AutoGenerateColumns="False" ClientInstanceName="QueryTree"
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                    Font-Size="10pt" KeyFieldName="bmbm" ParentFieldName="fbmbm" Width="100%" OnCustomCallback="DxTreelist_CustomCallback">
                                    <Columns>
                                        <dx:TreeListTextColumn Caption="部门编号" FieldName="bmbm" ShowInCustomizationForm="True"
                                            VisibleIndex="0" Width="150px">
                                        </dx:TreeListTextColumn>
                                        <dx:TreeListTextColumn Caption="部门名称" FieldName="bmmc" ShowInCustomizationForm="True"
                                            VisibleIndex="1" Width="150px">
                                        </dx:TreeListTextColumn>
                                    </Columns>
                                    <Settings SuppressOuterGridLines="True" />
                                    <SettingsBehavior AllowFocusedNode="True" AutoExpandAllNodes="True" />
                                    <%--<ClientSideEvents EndCallback="ShowUser" />--%>
                                    <Settings SuppressOuterGridLines="True"></Settings>
                                    <SettingsBehavior AllowFocusedNode="True" AutoExpandAllNodes="True"></SettingsBehavior>
                                    <SettingsPager>
                                        <Summary Text="当前第{0}页，共{1}页，{2}条记录" />
                                        <Summary Text="当前第{0}页，共{1}页，{2}条记录"></Summary>
                                    </SettingsPager>
                                    <SettingsSelection Enabled="True" Recursive="True" />
                                    <SettingsSelection Enabled="True" Recursive="True"></SettingsSelection>
                                    <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                        <LoadingPanel Url="~/App_Themes/Office2010Blue/TreeList/Loading.gif">
                                        </LoadingPanel>
                                    </Images>
                                    <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                        <LoadingPanel ImageSpacing="5px">
                                        </LoadingPanel>
                                    </Styles>
                                    <StylesPager>
                                        <PageNumber ForeColor="#3E4846">
                                        </PageNumber>
                                        <Summary ForeColor="#1E395B">
                                        </Summary>
                                    </StylesPager>
                                    <StylesEditors ButtonEditCellSpacing="0">
                                    </StylesEditors>
                                </dx:ASPxTreeList>
                            </dx:PanelContent>
                        </PanelCollection>
                    </dx:ASPxCallbackPanel>
                    <%--  <dx:ASPxGridView ID="gvpartlist" runat="server" Width="100%" AutoGenerateColumns="False"
                    ClientInstanceName="lists" DataSourceID="LSMDSourceMainProBM" KeyFieldName="bmbm"
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" OnCustomCallback="gvpartlist_CustomCallback">
<ClientSideEvents EndCallback="ShowUser"></ClientSideEvents>
                    <Columns>
                        <dx:GridViewCommandColumn ShowInCustomizationForm="True" ShowSelectCheckbox="True"
                            VisibleIndex="0">
                            <HeaderTemplate>
                                <input type="checkbox" onclick="lists.SelectAllRowsOnPage(this.checked);" title="全选或取消" />
                            </HeaderTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ClearFilterButton Visible="True">
                            </ClearFilterButton>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn Caption="部门编码" FieldName="bmbm" Name="t_rybm" ReadOnly="True"
                            ShowInCustomizationForm="True" VisibleIndex="0">
                            <EditFormSettings CaptionLocation="Near" />
<EditFormSettings CaptionLocation="Near"></EditFormSettings>

                            <CellStyle HorizontalAlign="Left">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="部门名称" FieldName="bmmc" Name="t_ryxm" ShowInCustomizationForm="True"
                            VisibleIndex="1">
                            <EditFormSettings CaptionLocation="Near" />
<EditFormSettings CaptionLocation="Near"></EditFormSettings>

                            <CellStyle HorizontalAlign="Left">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <Settings ShowFilterRow="true" ShowGroupPanel="false" />
                    <Settings ShowVerticalScrollBar="true" />
                    <ClientSideEvents EndCallback="ShowUser" />

<Settings ShowFilterRow="True" ShowVerticalScrollBar="True"></Settings>

                    <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanelOnStatusBar>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </Images>
                    <ImagesFilterControl>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </ImagesFilterControl>
                    <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                        </Header>
                        <LoadingPanel ImageSpacing="5px">
                        </LoadingPanel>
                    </Styles>
                    <StylesPager>
                        <PageNumber ForeColor="#3E4846">
                        </PageNumber>
                        <Summary ForeColor="#1E395B">
                        </Summary>
                    </StylesPager>
                    <StylesEditors ButtonEditCellSpacing="0">
                        <ProgressBar Height="21px">
                        </ProgressBar>
                    </StylesEditors>
                </dx:ASPxGridView>--%>
                    <table width="100%">
                        <tr>
                            <td align="right">
                                <%--<dx:ASPxButton ID="BtnUser" runat="server" Font-Size="10pt" Text="保存" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    Width="60px" AutoPostBack="false" UseSubmitBehavior="false" Height="26px" 
                                    OnClick="BtnUser_Click">
                                    <ClientSideEvents Click="function(s, e) {
                                list.PerformCallback(labcxbm.GetText());
                        }" />
<ClientSideEvents Click="function(s, e) {
                                lists.PerformCallback(labcxbm.GetText());
                        }"></ClientSideEvents>
                                </dx:ASPxButton>--%>
                                <dx:ASPxButton ID="btnSave" runat="server" Text="保存" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    AutoPostBack="False" UseSubmitBehavior="False">
                                    <ClientSideEvents Click="function(s,e){QueryPanel.PerformCallback(labcxbm.GetValue()); ShowUser();}" />
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                </dx:PopupControlContentControl>
            </ContentCollection>
        </dx:ASPxPopupControl>
        <dx:ASPxPopupControl ID="ASPxPopupControl1" runat="server" ClientInstanceName="pupProShow"
            Width="450px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
            EnableHotTrack="False" HeaderText="选择商品信息" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
            Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter">
            <ContentCollection>
                <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                    <table>
                        <tr>
                            <td>
                                商品编码：
                            </td>
                            <td>
                                <dx:ASPxLabel ID="labProid" runat="server" ClientInstanceName="labProid" Text="">
                                </dx:ASPxLabel>
                            </td>
                            <td>
                                商品名称：
                            </td>
                            <td>
                                <dx:ASPxLabel ID="labProname" runat="server" ClientInstanceName="labProname" Text="">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                    </table>
                    <dx:ASPxGridView ID="ShowProduct" runat="server" ClientInstanceName="prolist" KeyFieldName="spbm"
                        Width="100%" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                        CssPostfix="Office2010Blue" OnCustomCallback="ShowProduct_CustomCallback">
                        <ClientSideEvents SelectionChanged="gridPro_SelectionChanged" />
                        <ClientSideEvents EndCallback="ShowProduct" />
                        <Columns>
                            <dx:GridViewCommandColumn ShowInCustomizationForm="True" ShowSelectCheckbox="True"
                                VisibleIndex="0" Width="10px">
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dx:GridViewCommandColumn>
                            <dx:GridViewDataTextColumn FieldName="spbm" ReadOnly="True" ShowInCustomizationForm="True"
                                VisibleIndex="0" Settings-AllowAutoFilter="False" Caption="商品编码">
                                <Settings AllowAutoFilter="False"></Settings>
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="spmc" ShowInCustomizationForm="True" VisibleIndex="1"
                                Caption="商品名称">
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <SettingsBehavior AllowSelectSingleRowOnly="true" />
                        <Settings ShowFilterRow="True" ShowVerticalScrollBar="True" />
                        <SettingsText EmptyDataRow="没有记录" />
                        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanelOnStatusBar>
                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <ImagesFilterControl>
                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </ImagesFilterControl>
                        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                            </Header>
                            <LoadingPanel ImageSpacing="5px">
                            </LoadingPanel>
                        </Styles>
                        <StylesPager>
                            <PageNumber ForeColor="#3E4846">
                            </PageNumber>
                            <Summary ForeColor="#1E395B">
                            </Summary>
                        </StylesPager>
                        <StylesEditors ButtonEditCellSpacing="0">
                            <ProgressBar Height="21px">
                            </ProgressBar>
                        </StylesEditors>
                    </dx:ASPxGridView>
                    <%--  <table width="100%">
                        <tr>
                            <td align="right">
                                <dx:ASPxButton ID="ASPxButton1" runat="server" Text="保存" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    AutoPostBack="False" UseSubmitBehavior="False">
                                    <ClientSideEvents Click="function(s,e){prolist.PerformCallback(labProid.GetValue()); }" />
                                    <ClientSideEvents Click="function(s,e){prolist.PerformCallback(labProid.GetValue()); }">
                                    </ClientSideEvents>
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>--%>
                </dx:PopupControlContentControl>
            </ContentCollection>
        </dx:ASPxPopupControl>
        <dx:LinqServerModeDataSource ID="LSMDSourceMainProPromotion" runat="server" ContextTypeName="DAL.DataClassesDataContext"
            EnableDelete="True" EnableInsert="True" EnableUpdate="True" TableName="css_sp_mjms" />
        <asp:SqlDataSource ID="LSMDSourceMainProBM" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="SELECT bmbm,bmmc FROM [css_department]"></asp:SqlDataSource>
        <dx:LinqServerModeDataSource ID="LSMDSourceMainProducts" runat="server" ContextTypeName="DAL.DataClassesDataContext"
            TableName="css_spjbxx" />
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="SELECT [spbm], [spmc] FROM [css_spjbxx]"></asp:SqlDataSource>
    </div>
</asp:Content>
